package remote;

import java.rmi.RemoteException;
import java.sql.*;

public class SimpleStatement extends StatementAdapter {
   private RemoteStatement rstmt;
   
   public SimpleStatement(RemoteStatement s) {
      rstmt = s;
   }
   
   public boolean execute(String sql) throws SQLException {
	   try {
		   return rstmt.execute(sql);
	   } catch(RemoteException e) {
		   throw new SQLException(e);
	   }
   }
   
   public ResultSet getResultSet() throws SQLException {
	   try {
		   return rstmt.getResultSet();
	   } catch(RemoteException e) {
		   throw new SQLException(e);
	   }
   }
   
   public void close() throws SQLException {
	   try {
		   rstmt.close();
	   } catch(RemoteException e) {
		   throw new SQLException(e);
	   }
   }
}

